<%-- 
    Document   : CadastroVeiculo
    Created on : 13/04/2011, 15:19:04
    Author     : Dalhanges
--%>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false"%>
<%@ page import="java.util.List" %>
<%@ page import="javax.jdo.PersistenceManager" %>
<%@ page import="com.google.appengine.api.users.User" %>
<%@ page import="com.google.appengine.api.users.UserService" %>
<%@ page import="com.google.appengine.api.users.UserServiceFactory" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
    <head>
        <link type="text/css" rel="stylesheet" href="/CSS/Home.css" />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Cadastro do Veículo</title>
    </head>
    <body>
        <f:view>
            <h:form id="cadastro_veiculo">
                <center><h1>Anunciar</h1></center>
                <h2>Cadastro do Veículo</h2>
                <pre>
                   <label>E-mail:</label>
                   <h:inputText value="#{veiculoBean.email}" maxlength="50" size="40" />
                   <label>Senha:</label>
                   <h:inputSecret value="#{veiculoBean.senha}" maxlength="20" size="20" />
                   <label>Placa:</label>
                   <h:inputText value="#{veiculoBean.placa}" maxlength="7" size="8" />
                   <label>Marca:</label>
                   <h:selectOneMenu value="#{veiculoBean.marca}">
                        <f:selectItems value="#{veiculoBean.marcaList}" />
                   </h:selectOneMenu>
                   <label>Modelo:</label>
                   <h:inputText value="#{veiculoBean.modelo}" maxlength="50" size="40" />
                   <label>Ano de Fabricação:</label>
                   <h:inputText value="#{veiculoBean.anoFabricacao}" maxlength="4" size="5" />
                   <label>Ano do Modelo:</label>
                   <h:inputText value="#{veiculoBean.anoModelo}" maxlength="4" size="5" />
                   <label>Cor:</label>
                   <h:inputText value="#{veiculoBean.cor}" maxlength="50" size="40" />
                   <label>Combustível:</label>
                   <h:selectOneMenu value="#{veiculoBean.combustivel}">
                        <f:selectItems value="#{veiculoBean.combustivelList}" />
                   </h:selectOneMenu>
                   <label>KM:</label>
                   <h:inputText value="#{veiculoBean.km}" maxlength="50" size="40" />
                   <label>Nro de Portas:</label>
                   <h:selectOneMenu value="#{veiculoBean.portas}">
                       <f:selectItems value="#{veiculoBean.portasList}" />
                   </h:selectOneMenu>
                   <label>Valor à vista:</label>
                   <h:inputText value="#{veiculoBean.valorVista}" maxlength="50" size="40" />
                   <label>Características do Veículo:</label>
                   <h:inputTextarea value="#{veiculoBean.caracteristicas}" cols="50" rows="10" />
                   <h:commandButton value="Cadastrar" action="#{veiculoBean.cadastrar}" />
                </pre>
            </h:form>
        </f:view>
    </body>
</html>